<template>
  <ant-modal
    modalWidth="576"
    modalHeight="450"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-divider orientation="left">模板基本信息</a-divider>
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="模板名称" prop="templateName">
            <a-input v-model="form.templateName" placeholder="请输入模板名称"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12" >
          <a-form-model-item label="模板状态" prop="templateStatus">
            <a-radio-group v-model="form.templateStatus">
              <a-radio
                v-for="(dict, index) in templateStatusOptions"
                :key="index"
                :value="dict.dictValue"
              >
                {{ dict.dictLabel }}
              </a-radio>
            </a-radio-group>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-divider orientation="left">操作提示</a-divider>
      <a-icon type="check" />请在创建模板后通过'编辑引导步骤'按钮对步骤细节信息进行维护<br/>
      <a-icon type="check" />如果模板为禁用状态，则该模板二维码扫码后弹出'引导模板未启用,模板ID-xx'<br/>
      <a-icon type="check" />目前仅支持预导入方式圈定引导用户群体，未圈定的用户群体扫描该二维码后弹出'用户未圈选'<br/>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        创建模板
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import ModGuideTemplateAddForm from './ModGuideTemplateForm'
export default {
  ...ModGuideTemplateAddForm
}
</script>
